<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>
        {% block title %}
            {# 其他页面可以重写标题 #}
        {% endblock %}
    </title>
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/base.css">
    <script src="/static/js/jquery.js"></script>
    <script src="/static/layui/layui.js"></script>
    {% block css %}
    {% endblock %}
</head>
<body>
<div id="bg"></div>
<ul class="layui-nav" lay-filter="">
    <li class="layui-nav-item"><a href="/">在线博客平台</a></li>
    <li class="layui-nav-item"><a href="/admin">在线博客管理平台</a></li>
    {% if adminName %}
        <li class="layui-nav-item{% block blog_class %}{% endblock %}"><a href="/blog/blogAll_admin">管理博客</a></li>
        <li class="layui-nav-item{% block about_class %}{% endblock %}"><a href="/blog/allComment">管理评论</a></li>
        <li class="layui-nav-item" style="float: right; margin-right: 30px;">
            <a href="javascript:;">{{ name_admin }}</a>
            <dl class="layui-nav-child">
                <dd><a href="/admin/updatePwd">修改密码</a></dd>
                <dd><a href="/admin/logout">注销</a></dd>
            </dl>
        </li>
    {% else %}
        <li class="layui-nav-item{% block login_class %}{% endblock %}" style="float: right"><a href="/admin/login/">登录</a>
        </li>
    {% endif %}
</ul>

<div class="content">
    {% block content %}
        {# 其他页面内容 #}
    {% endblock %}
</div>

<script>
    layui.use('element', function () {
        var element = layui.element;
    });
</script>
</body>
</html>